import axios from '~/plugins/axios';

//查询--根据条件分页查询获取列表
export const getRightsSearchList =  function({ commit, state }, preload)  {
	return axios.post(process.env.baseUrl + '/brandCookie/getList',preload||{})
	.catch(function (error) {	
    });
};

//删除--根据品牌权限表id删除指定数据
export const getRightsDelete =  function({ commit, state }, preload)  {
	return axios.post(process.env.baseUrl + '/brandCookie/deleteBrandCookie',preload||{})
	.catch(function (error) {	
    });
};

//新增--根据品牌id、品牌名称和品牌cookie添加数据
export const getRightsAddData =  function({ commit, state }, preload)  {
	return axios.post(process.env.baseUrl + '/brandCookie/addBrandCookie',preload||{})
	.catch(function (error) {	
    });
};

//获取名牌名称
export const getRightsBrandsList =  function({ commit, state }, preload)  {
	return axios.post(process.env.baseUrl + '/sauronBrand/getSelfBrandsListforOperation',preload||{})
	.catch(function (error){
    });
};

//根据主键id更新cookie
export const getCookieUpdate =  function({ commit, state }, preload)  {
	return axios.post(process.env.baseUrl + '/brandCookie/updateBrandCookie',preload||{})
	.catch(function (error){
    });
};

//抓取——按id和cookie开启抓取功能
export const getRightsbrandCookie =  function({ commit, state }, preload)  {
	return axios.post(process.env.baseUrl + '/brandCookie/grabData',preload||{})
	.catch(function (error){
    });
};
